<!DOCTYPE html>
<html class="no-js">
<head lang="en">

    <#include "../head_import.html" />

</head>
<body>
<#include "../include/top_nav.html">
    <div class="am-cf admin-main">

        <!-- sidebar start -->
        <#include "../left.html">
            <!-- sidebar end -->
            <!-- content start-->
            <div class="admin-content">
                <div class="am-cf am-padding">
                    <div class="am-fl am-cf"><@s.m "global.position"/>: <@s.m "shopMerchandise.function"/> - <@s.m "global.list"/></div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-sm-centered">
                        <form class="ropt">
                            <input type="submit" value="<@s.m "global.add"/>" onclick="this.form.action='add.do';"/>
                        </form>
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-sm-centered">
                        <form id="tableForm" method="post" class="am-form">
                            <input type="hidden" name="pageNo" value="${pageNo!}"/>
                            <@p.table value=pagination;shopMerchandise,i,has_next><#rt/>
                            <@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
                            <input type='checkbox' name='ids' value='${shopMerchandise.id}'/><#t/>
                        </@p.column><#t/>
                        <@p.column title="ID">${shopMerchandise.id}</@p.column><#t/>
                    <@p.column code="shopMerchandise.name">${shopMerchandise.name}</@p.column><#t/>
                <@p.column code="global.operate" align="center">
                <a href="edit.do?id=${shopMerchandise.id}&pageNo=${pageNo!}"><@s.m "global.edit"/></a> | <#rt/>
                <a href="o_delete.do?ids=${shopMerchandise.id}&pageNo=${pageNo!}" onclick="if(!confirm('<@s.m "global.confirm.delete"/>')) {return false;}"><@s.m "global.delete"/></a><#t/>
            </@p.column><#t/>
        </@p.table>
        <div><input type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/></div>
        </form>
            </div>
    </div>



    </div>

    </div>

<script type="text/javascript">
function getTableForm() {
	return document.getElementById('tableForm');
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	if(!confirm("<@s.m 'global.confirm.delete'/>")) {
		return;
	}
	var f = getTableForm();
	f.action="o_delete.do";
	f.submit();
}
</script>

<#include "/common/alert_message.html"/>
</body>
</html>